import request from '@/utils/request'
export const getArticleList = (params) => {
  return request({
    url: '/admin/interview/query',

    params
  })
}
// 封装添加面经的函数 传的是对象，所以这里直接，id在里面写对象就好了
export const addArticle = (data) => {
  return request({
    method: 'post',
    url: '/admin/interview/create',
    data
  })
}
// 封装删除函数
export const delArticle = (id) => {
  return request({
    method: 'delete',
    url: '/admin/interview/remove',
    data: { id }
  })
}
// 获取单个面经数据
export const editArticle = (id) => {
  return request({
    url: '/admin/interview/show',
    params: { id }
  })
}
// 更新面经数据
export const updateArticle = (data) => {
  return request({
    method: 'put',
    url: '/admin/interview/update',
    data
  })
}
